package net.xyuu.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
import org.springframework.data.web.config.SpringDataWebConfiguration;

/**
 * Created by XYUU on 2016/11/27.
 */
@Configuration
public class DataWebConfiguration extends SpringDataWebConfiguration {
    @Bean
    public PageableHandlerMethodArgumentResolver pageableResolver() {
        PageableHandlerMethodArgumentResolver resolver = super.pageableResolver();
        resolver.setOneIndexedParameters(true);
        resolver.setSizeParameterName("pageSize");
        return resolver;
    }
}
